<script setup>
	import service from '@/utils/request.js'
	import {
		loginToBc
	} from '@/apis/user.js'
	console.log('setup')
	wx.login({
		success: (res) => {
			console.log(res)
			if (res.errMsg === "login:ok") {
				console.log(res.code)
				const data = {
					code: res.code
				}
				loginToBc(data).then(res => {
					console.log(res)
				})
			}
		},
		fail(err) {
			console.log(err)
		}
	});
</script>

<style lang="scss">
	/*每个页面公共css */
	@import '@/uni_modules/uni-scss/index.scss';
	/* #ifndef APP-NVUE */
	@import '@/static/customicons.css';

	// 设置整个项目的背景色
	page {
		background-color: #f5f5f5;
	}

	/* #endif */
	.example-info {
		font-size: 14px;
		color: #333;
		padding: 10px;
	}
</style>